//
//  IGDrawListModel.m
//  jingdongfang
//
//  Created by BOE on 2018/5/22.
//  Copyright © 2018年 BOE-SBG-CTO. All rights reserved.
//

#import "IGDrawModel.h"

@implementation IGLabelModel
+ (JSONKeyMapper *)keyMapper
{
    return [[JSONKeyMapper alloc]
            initWithModelToJSONDictionary:@{
                                            @"title":@"label",
                                            @"aId":@"labelId"
                                            }];
}
@end

@implementation IGDrawModel

+ (JSONKeyMapper *)keyMapper
{
    return [[JSONKeyMapper alloc]
            initWithModelToJSONDictionary:@{
                                            @"drawId":@"id"
                                            }];
}

- (IGShareModel *)getShareModel {
    IGShareModel *shareModel = [IGShareModel new];
    shareModel.title = self.title;
//    shareModel.webpageUrl = self.url;
    shareModel.descr = self.content.length>40?[self.content substringToIndex:39]:self.content;
    shareModel.thumbURL = self.image;
    return shareModel;
}

@end
